@charset "UTF-8";
@use 'sass:math';
//栅格容器
@mixin grid_row_inline_block() {
  font-size: 0;
  &>*{
    font-size: initial
  }
}

@mixin auto_grids_inline_block($cols: $columns, $gutters: $gutters) {
  $gutter: map-get($gutters, middle);
  //包裹样式
  #{$container} {
    @include grid_container;
  }
  #{$grid_row_name} {
    @include grid_container; // 由于存在全屏方式故，将其修改到row上，修正row row的宽度
    @include grid_row_inline_block;
    #{$grid_row_name} {
      display: block;
      width: auto;
      margin: 0 math.div(-$gutter, 2);
    }
  }

  #{enumerate($grid_col_name, 1, $cols, $separator)} {
    // 最大栅格同样应该保留
    @include grid_unit_base($gutter);
  }

  @for $n from 1 through $cols {
    #{$grid_col_name}#{$separator}#{$n} {
      width: get_width($n, $cols, $gutter);
    }
    #{$grid_col_name}#{$separator}#{$n}#{$grid_col_row_name} {
      font-size: 0;
      padding: 0;
      &>*{
        font-size: initial
      }
    }
    @if $n!=$cols {
      #{$grid_col_name}#{$separator}offset#{$separator}#{$n} {
        margin-left: get_offset($n, $cols, $gutter);
      }
    }
  }

  @include grid_col_space($gutters);
  @include grid_row_space($gutters);
}
